#include "lwip/sockets.h"
#include <Arduino.h>
#include "WebServer.h"
#include "WiFiClient.h"
#include "Client.h"
// tcp  global variable begin
struct sockaddr_in server_add,client_addr; 
int sock,client_socket;
socklen_t client_len = sizeof(client_addr); 
//tcp  global variable end

typedef struct {
  char* altiude;
  char* latitude;
  int longitude; 
}Params;

typedef struct {
  long id;
  String method;
  Params * params; 
}
cJson;



void Camera_Init();
void MqttPublish(cJSON * json);
void reconnect();
void callback(char* topic, uint8_t* payload, unsigned int length);
cJSON* json_list();
void startCameraServer();
void tcp_n();
void SG60(int pwm);

void task_send(void *parameter);
void tesk_camera(void *parameter);
void task_rev(void *parameter);
void task_sg90(void *parameter);
void task_Aiot(void *parameter);
SemaphoreHandle_t Carema_finsh;